﻿<ion-view view-title="Ingresar" name="login-view">
    <ion-content class="padding">
        <form name="loginForm" novalidate>
            <div class="list list-inset">
                <ionic-list>
                    <div class="item item-divider">
                        Tipo de acceso
                    </div>
                    <ion-radio ng-repeat="item in loginTypes" ng-value="item.value"
                               ng-model="user.loginType">
                        {{ item.text }}
                    </ion-radio>
                </ionic-list>
                <div class="item item-divider">
                    Datos de acceso
                </div>
                <label class="item item-input">
                    <span class="input-label">Usuario</span>
                    <input type="text" ng-model="user.username" required>
                </label>
                <label class="item item-input">
                    <span class="input-label">Contrase&ntilde;a</span>
                    <input type="password" ng-model="user.password" required>
                </label>
            </div>
            <button ng-disabled="loginForm.$invalid" class="button button-block button-calm" ng-click="login(user)">Ingresar</button>
        </form>
    </ion-content>
</ion-view>